using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
namespace Bussiness.Manager
{
    public class PT_Role_FunctionManager : Bussiness.ManagerBase.PT_Role_FunctionManagerBase
    {
        public static PT_Role_FunctionManager CreateInstant()
        {
            return new PT_Role_FunctionManager();
        }

        public DataTable LoadFunction(int roleId)
        {
            string sql = "select * from vw_PT_RoleFunction where RoleId = " + roleId;

            return SqlHelper.ExecuteDataTable(Config.ConnectionConfig.ConnectionString, CommandType.Text, sql);
        }

        public DataTable GetAllForm(int roleId)
        {
            string sql = "select distinct FormName from vw_PT_RoleFunction where RoleId = " + roleId;

            return SqlHelper.ExecuteDataTable(Config.ConnectionConfig.ConnectionString, CommandType.Text, sql);
        }
    }
}
                    
